import {createApp} from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import request from './axios'
import ElementPlus from 'element-plus'
import locale from 'element-plus/lib/locale/lang/zh-cn'
import 'element-plus/dist/index.css'
import 'default-passive-events'

// import './mock'

import "@/assets/css/global.css"
import global from './globalFun'
// import axios from 'axios'


const app = createApp(App);

app.config.globalProperties.$axios = request;


app.mixin({
    methods: {
        hasAuth(perm){
            var authority = this.$store.state.menus.permList
            return authority.indexOf(perm) > -1
        }
    }
})

app.use(store).use(router).use(ElementPlus, { locale }).mount('#app')
